<template>
	<header class="flex justify-between align-center">
		  <!-- 返回按钮 -->
		  <view class="back-button" @tap="back">
			<text class="wlIcon-fanhui1" :style="{color: backColor,fontSize: size + 'rpx'}"></text>
		  </view>
	</header>
</template>

<script>
	export default {
		props: {
			size: {
				type: Number,
				default: 36
			},
			leftClick: {
				type: Function,
			},
			backColor: {
				type: String,
				default: '#fff'
			}
		},
		methods: {
			back() {
				if(this.leftClick) {
					this.leftClick()
				} else {
					uni.navigateBack()
				}
			}
		}
	}
</script>

<style>
	header {
		z-index: 1;
		height: 60rpx;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		color: #fff;
		padding-left: 28rpx;
	}
</style>